import {Page, Property, TriggerEnum} from "csap-typescript-vue2/lib";

/**
 * 发布是否信息
 */
export class PushSuccess {
    success: boolean;
    content: Array<string>;
}

/**
 * 文档信息
 */
export class ApidocModel extends Page {
    @Property("创建时间")
    createTime?: string;
    @Property("修改时间")
    updateTime?: string;
    @Property("环境ID")
    envId?: number;
    @Property("环境名称", [{trigger: TriggerEnum.blur, required: true, message: "请选择环境名称"}])
    envName?: string;
    @Property("项目ID")
    projectId?: number;
    @Property("项目名称")
    projectName?: string;
    @Property("文档名称", [{trigger: TriggerEnum.blur, message: "请输入文档名称", required: true}])
    name ?: string;
    @Property("文档路径", [{message: "请输入文档路径", trigger: TriggerEnum.blur, required: true}])
    path ?: string;
    @Property("icon路径", [{message: "请输入ICON", trigger: TriggerEnum.blur, required: true}])
    icon ?: string;
    @Property("摘要", [{message: "请输入摘要", trigger: TriggerEnum.blur, required: true}])
    descr?: string;
    @Property("文档详细介绍")
    md?: string;
    @Property("文档访问的URL", [{message: "请输入文档访问的URL", trigger: TriggerEnum.blur, required: true}])
    link?: string;
}

export class ApidocSearchModel extends Page {
    id?: number;
    createTime?: string;
    updateTime?: string;
    envId?: number;
    envName?: string;
    projectId?: number;
    projectName?: string;
    name?: string;
    path?: string;
    mockUrl?: string;
    createName?: string;
}

export class ApidocResultModel extends Page {
    id?: number;
    createTime?: string;
    updateTime?: string;
    envId?: number;
    envName?: string;
    projectId?: number;
    projectName?: string;
    name?: string;
    path?: string;
    mockUrl?: string;
    createName?: string;
}
